<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
	xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
	layout:decorator="layout">
<!-- layout文件路径-->
<head>
<meta charset="utf-8" />
<title>Blog后台管理中心</title>
<!-- 自定义表格样式 -->
<link rel="stylesheet" href="../../static/css/bootstrap.min.css"
	th:href="@{/css/table.min.css}" />
</head>

<body>
	<div layout:fragment="content"
		style="width: 90%; margin-left: auto; margin-right: auto; float: right;">
		<div class="alter-msg">
			<p class="alter-msg content" th:text="${msg}"></p>
		</div>
		<!-- <img src="" th:src="@{/getfile}" width="100" height="100"/> -->
		<table class="hovertable">
			<thead>
				<tr>
					<th>序号</th>
					<th>缩略图</th>
					<th>文章标题</th>
					<th>文章类型</th>
					<th>文章作者</th>
					<th>是否推荐</th>
					<th>创建时间</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<tr th:each="article,iterStat:${articlelist.content}">
					<td th:text="${iterStat.index}+1">序号</td>
					<td><img src="www.baidu.com"
						th:src="@{/getfilebyname/(filename=${article.articleIcon})}"
						width="50" height="50" /></td>
					<td th:text="${article.articleName}">文章标题</td>
					<td th:text="${article.articleType.typeName}">文章类型</td>
					<td th:text="${article.user.nickName}">作者</td>
					<td th:if="${article.recommend} == 1">否</td>
					<td th:if="${article.recommend} == 2">是</td>
					<td th:text="${article.regTime}">创建时间</td>
					<td><a href="/admin/updateuser"
						th:href="@{/admin/updatearticle/{id}(id=${article.id})}"
						class="button button-primary button-rounded button-small">修改</a>|<a
						href="/admin/updateuser"
						th:href="@{/admin/removearticle/{id}(id=${article.id})}"
						class="button button-primary button-rounded button-small">删除</a></td>
				</tr>
				<tr>
					<td colspan="8">
						<button class="button button-primary button-box button-small"
							onclick="location.href='/admin/addarticle'">
							<i class="fa fa-plus"></i>
						</button>
					</td>
				</tr>
			</tbody>
		</table>

	</div>
</body>
</html>